<!--
  Generated template for the RepositoryAddPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>
  <ion-navbar style="opacity: 0.8" no-border-bottom color="primary">
    <ion-title>增加知识库</ion-title>
  </ion-navbar>
</ion-header>


<ion-content>
    <ion-list>
      <ion-item>
        <ion-label>分类</ion-label>
        <ion-select name="tab" okText="确定" cancelText="取消" [(ngModel)]="topicParams.typeid" interface="popover">
          <ion-option *ngFor="let vo of repositorytype" value="{{vo.typeid}}">{{vo.typename}}</ion-option>
        </ion-select>
      </ion-item>
      <ion-item>
        <ion-label stacked>标题</ion-label>
        <ion-textarea name="title" rows="2" placeholder="简单描述要分享的主题,最大256字符" required [(ngModel)]="topicParams.title"></ion-textarea>
      </ion-item>
      <!--
      <ion-item>
        <ion-label stacked>原因分析</ion-label>
        <ion-textarea name="cause" rows="3" placeholder="原因分析" required [(ngModel)]="topicParams.cause"></ion-textarea>
      </ion-item>
      -->
      <ion-item>
        <ion-label stacked>内容</ion-label>
        <ion-textarea name="resolvent" rows="3" placeholder="分析内容" required [(ngModel)]="topicParams.resolvent"></ion-textarea>
      </ion-item>
    </ion-list>
  <div style="text-align: center; margin-left: 30px; margin-right: 30px;">
    <button ion-button block color="danger" (click)="onSubmit()"> 发布 </button>
  </div>
  <p *ngIf="showflg">{{errormsg}}</p>
</ion-content>
